package com.crm.service.impl;

import com.crm.dao.OrderDetailsDao;
import com.crm.entity.OrderDetails;
import com.crm.service.OrderDetailsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 订单详情Service实现类
 *
 * @author 高旭
 * @date 2020-12-25
 */
@Service("orderDetailsService")
public class OrderDetailsServiceImpl implements OrderDetailsService {

    @Resource
    private OrderDetailsDao orderDetailsDao;

    @Override
    public List<OrderDetails> find(Map<String, Object> map) {
        return orderDetailsDao.find(map);
    }

    @Override
    public Long getTotal(Map<String, Object> map) {
        return orderDetailsDao.getTotal(map);
    }

    @Override
    public float getTotalPriceByOrderId(Integer orderId) {
        return orderDetailsDao.getTotalPriceByOrderId(orderId);
    }

}
